$OpenBSD: patch-kimap_tests_CMakeLists_txt,v 1.1 2014/07/09 20:03:30 zhuk Exp $
Fix build.
--- kimap/tests/CMakeLists.txt.orig	Sun May 18 21:50:15 2014
+++ kimap/tests/CMakeLists.txt	Sun May 18 21:51:36 2014
@@ -13,8 +13,8 @@ MACRO(KIMAP_UNIT_TESTS)
   FOREACH(_testname ${ARGN})
     kde4_add_unit_test(${_testname} TESTNAME kimap-${_testname} NOGUI ${_testname}.cpp)
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}")
-    target_link_libraries(${_testname} ${KDE4_KDECORE_LIBS} ${QT_QTTEST_LIBRARY}
-                          kimap kimaptest kmime)
+    target_link_libraries(${_testname} kimaptest kimap kmime
+                          ${KDE4_KDECORE_LIBS} ${QT_QTTEST_LIBRARY})
     set_target_properties(${_testname} PROPERTIES COMPILE_FLAGS -DTEST_DATA="\\"${CMAKE_CURRENT_SOURCE_DIR}\\"")
   ENDFOREACH(_testname)
 ENDMACRO(KIMAP_UNIT_TESTS)
@@ -23,7 +23,7 @@ MACRO(KIMAP_EXECUTABLE_TESTS)
   FOREACH(_testname ${ARGN})
     kde4_add_executable(${_testname} NOGUI TEST ${_testname}.cpp)
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}")
-    target_link_libraries(${_testname} ${KDE4_KDECORE_LIBS} kimap kmime)
+    target_link_libraries(${_testname} kimap kmime ${KDE4_KDECORE_LIBS})
   ENDFOREACH(_testname)
 ENDMACRO(KIMAP_EXECUTABLE_TESTS)
 
